package com.shop.cereshop.business.dao.activity;

import com.shop.cereshop.business.page.activity.ActivitySign;
import com.shop.cereshop.business.page.finance.ShopBond;
import com.shop.cereshop.business.page.order.Product;
import com.shop.cereshop.business.param.activity.ActivitiSignGetAllParam;
import com.shop.cereshop.business.param.activity.ActivitySignGetProductParam;
import com.shop.cereshop.business.param.finance.BondParam;
import com.shop.cereshop.commons.domain.activity.CereActivitySign;
import com.shop.cereshop.commons.domain.shop.CereShopGroup;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface CereActivitySignDAO {
    int deleteByPrimaryKey(Long signId);

    int insert(CereActivitySign record);

    int insertSelective(CereActivitySign record);

    CereActivitySign selectByPrimaryKey(Long signId);

    int updateByPrimaryKeySelective(CereActivitySign record);

    int updateByPrimaryKey(CereActivitySign record);

    List<ActivitySign> getAll(ActivitiSignGetAllParam param);

    List<Product> getById(@Param("signId") Long signId);

    List<Product> getProducts(ActivitySignGetProductParam param);

    List<CereShopGroup> getGroups(@Param("shopId") Long shopId);

    CereActivitySign findByShopIdAndActivityId(@Param("shopId") Long shopId,@Param("activityId") Long activityId);

    Integer findIfBond(@Param("activityId") Long activityId);

    CereActivitySign findBySignId(@Param("signId") Long signId);

    Integer findActitivyState(@Param("activityId") Long activityId);

    BigDecimal findBondTotal(@Param("shopId") Long shopId);

    List<ShopBond> getAllBond(BondParam param);

    String findTransactionId(@Param("formid") String formid);
}